module Switch #(
    parameter WIDTH = 64,
    parameter E = WIDTH + 2,
    parameter W = E * 2,
    parameter N = E / 2
) (
    input   logic [W-1:0]   Pin [N-1:0],
    input   logic [N-1:0]   Cin,
    output  logic [N-1:0]   Pout [W-1:0],
    output  logic [N-1:0]   Cout
);

    generate
        for (genvar i = 0; i < W; i++) begin : geni
            for  (genvar j = 0; j < N; j++) begin : genj
                assign Pout[i][j] = Pin[j][i];
            end
        end
    endgenerate

    assign Cout = Cin;

endmodule //Switch
